/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package nl.hanze.shoestring.dao.impl;

import java.util.List;
import javax.persistence.Query;
import nl.hanze.shoestring.dao.DeelnemerDAO;
import nl.hanze.shoestring.domain.Deelnemer;

/**
 *
 * @author alex
 */
public class DeelnemerDAOImpl extends BaseDAOImpl<Deelnemer> implements DeelnemerDAO{

    public DeelnemerDAOImpl() {
    }
    
    @Override
    public List<Deelnemer> findByKlantId(int klantId) {
        open();
        Query query = em.createQuery("Select m FROM Deelnemer m WHERE m.klantId = :klantId");
        query.setParameter("klantId", klantId);
        return query.getResultList(); 
    }

    
}
